#include<func.h>
void * sigfunc(void *p)
{
    printf("I am child thread\n");
    sleep(1);
    printf("you can't see me\n");
}
int main()
{
    pthread_t pthid;
    int ret=pthread_create(&pthid,NULL,sigfunc,NULL);
    THREAD_ERR_CHECK(ret,"pthread_create");
    ret=pthread_cancel(pthid);
    THREAD_ERR_CHECK(ret,"pthread_cancel");
    ret=pthread_join(pthid,NULL);
    THREAD_ERR_CHECK(ret,"pthread_join");
    printf("I am main thread\n");
    return 0;
}